/**
 * Created by cchen on 2015/4/28.
 */
var Schema = mongoose.Schema;

//===========================backoffice_adminusers==============================
var userServiceChain = new Schema({
    serviceId:{type: Schema.Types.ObjectId, ref: 'backoffice_adminusers'}, //管理员用户名，唯一
    userId:{type: Schema.Types.ObjectId, ref: 'user'},
    dateCreated: {type: Date, default: Date.now}, //创建日期
    dateLastModified: {type: Date, default: Date.now} //最后修改日期
});
mongoose.model('backoffice_userServiceChain', userServiceChain,'backoffice_userServiceChain');

var serviceCount=new Schema({
    count:Number
});
mongoose.model('backoffice_serviceCount', serviceCount,'backoffice_serviceCount');